package top.yokey.shopnc.model;

import top.yokey.base.base.BaseHttpClient;
import top.yokey.base.base.BaseHttpListener;

@SuppressWarnings("ALL")
public class MemberAccountModel {

    private final String ACT = "member_account";
    private static volatile MemberAccountModel instance;

    public static MemberAccountModel get() {
        if (instance == null) {
            synchronized (MemberAccountModel.class) {
                if (instance == null) {
                    instance = new MemberAccountModel();
                }
            }
        }
        return instance;
    }

    public void getMobileInfo(BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "get_mobile_info")
                .post(baseHttpListener);

    }

    public void getPayPwdInfo(BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "get_paypwd_info")
                .get(baseHttpListener);

    }

    public void bindMobileSetup1(String mobile, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "bind_mobile_step1")
                .add("mobile", mobile)
                .add("captcha", "")
                .add("codekey", "")
                .post(baseHttpListener);

    }

    public void bindMobileSetup2(String code, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "bind_mobile_step2")
                .add("auth_code", code)
                .post(baseHttpListener);

    }

    public void modifyPasswordSetup2(BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "modify_password_step2")
                .post(baseHttpListener);

    }

    public void modifyPasswordSetup3(String code, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "modify_password_step3")
                .add("auth_code", code)
                .post(baseHttpListener);

    }

    public void modifyPasswordSetup4(BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "modify_password_step4")
                .get(baseHttpListener);

    }

    public void modifyPasswordSetup5(String password, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "modify_password_step5")
                .add("password", password)
                .add("password1", password)
                .post(baseHttpListener);

    }

    public void modifyPayPassSetup2(BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "modify_paypwd_step2")
                .post(baseHttpListener);

    }

    public void modifyPayPassSetup3(String code, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "modify_paypwd_step3")
                .add("auth_code", code)
                .post(baseHttpListener);

    }

    public void modifyPayPassSetup4(BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "modify_paypwd_step4")
                .post(baseHttpListener);

    }

    public void modifyPayPassSetup5(String password, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "modify_paypwd_step5")
                .add("password", password)
                .add("password1", password)
                .post(baseHttpListener);

    }

    public void checkPayPwd(String password, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "check_paypwd")
                .add("password", password)
                .add("captcha", "")
                .add("codekey", "")
                .post(baseHttpListener);

    }

    public void modifyMobileStep2(String codeKey, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "modify_mobile_step2")
                .add("codekey", codeKey)
                .add("captcha", "")
                .post(baseHttpListener);

    }

    public void modifyMobileStep3(String autoCode, BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "modify_mobile_step3")
                .add("auth_code", autoCode)
                .post(baseHttpListener);

    }

}
